<!DOCTYPE html>
<html>
	<head lang="en">
		<meta charset="utf-8" />
		<title>LTMALL-修改密码</title>
		<link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
		<link rel="stylesheet" type="text/css" href="/css/all.min.css">
		<link rel="stylesheet" type="text/css" href="/css/owl.theme.default.min.css">
		<link rel="shortcut icon" type="image/x-icon" href="/img/Favicon.ico">
		<link rel="stylesheet" type="text/css" href="/css/animate.min.css">
		<link rel="stylesheet" type="text/css" href="/css/fontawesome.css">
		<link rel="stylesheet" type="text/css" href="/css/fontawesome.min.css">
		<link rel="stylesheet" type="text/css" href="/css/style.css">
		<link rel="stylesheet" type="text/css" href="/css/media.css">
		<link rel="stylesheet" type="text/css" href="/css/responsive.css">
		<link rel="stylesheet" type="text/css" href="/css/owl.carousel.css">
		<link rel="stylesheet" type="text/css" href="/css/magnific-popup.css">
		<link rel="stylesheet" type="text/css" href="/css/owl.theme.default.css">
		<link rel="stylesheet" href="/lib/layui-v2.6.3/css/layui.css" media="all">
		<link rel="stylesheet" href="/css/public.css" media="all">
		<link rel="stylesheet" type="text/css" href="/css/personal.css"/>
		<link rel="stylesheet" type="text/css" href="/css/mygrxx.css" />
		<style>
			.personalImg{
				text-align: center;
				height: auto;
				width: auto;
				white-space: normal;
				max-height: 80px;
				max-width: 90px;
				border-radius:50%;
				border: 1px solid salmon;
			}
		</style>
	</head>
	<body>
	<th:block th:include="header"/>
		<div class="Bott">
			<div class="wrapper clearfix">
				<th: block th:include="personalHeader"/>
				<div class="you fl">
					<h2>修改密码</h2>
					<div class="layui-form-item">
					<div class="layui-input-inline">
						<div class="layui-input-inline">
							<input id="prePassword" type="password" name="prePassword" class="layui-input demo-phone" placeholder="请输入原密码">
						</div>
					</div>
					</div>
					<div class="layui-form-item">
					<div class="layui-input-inline">
						<div class="layui-input-inline">
							<input id="newPassword" type="password" name="newPassword" class="layui-input demo-phone" placeholder="请输入新密码">
						</div>
					</div>
					</div>
					<div class="layui-form-item">
					<div class="layui-input-inline">
						<div class="layui-input-inline">
							<input id="confirmPassword" type="password" name="confirmPassword" class="layui-input demo-phone" placeholder="请再次输入新密码">
						</div>
					</div>
						<div class="layui-form-item">
							<div class="layui-input-inline">
								<button class="layui-btn layui-btn-primary layui-border-black" id="updatePassword" style="margin-top: 30px">提交</button>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

	<th:block th:include="end"/>

		<script src="/js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="/js/public.js" type="text/javascript" charset="utf-8"></script>
		<script src="/js/user.js" type="text/javascript" charset="utf-8"></script>
	<script src="/js/jquery-3.4.1.min.js"></script>
	<script src="/js/owl.carousel.js"></script>
	<script src="/js/bootstrap.min.js"></script>
	<script src="/js/jquery.magnific-popup.js"></script>
	<script src="/js/popper.min.js"></script>
	<script src="/js/all.min.js"></script>
	<script src="/js/index.js"></script>
	<script src="/js/wow.min.js"></script>

	<script src="../lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
	<script>
		layui.use([ 'form', 'table', 'layer'], function() {
			var $ = layui.jquery, form = layui.form;
			var table = layui.table;
			var layer = layui.layer;

			//给修改密码-提交按钮绑定事件
			$("#updatePassword").on("click",function() {
			    $.post("/updatePassword/updatePasswordByMemberId?prePassword="+$("#prePassword").val()+"&&newPassword="+$("#newPassword").val()+"&&confirmPassword="+$("#confirmPassword").val(),function (res){
					if (res.code===0) {
						layer.confirm("修改成功,请点击确认重新登录",function (){
							window.top.location.href="/login";
						});
					}else{
						layer.msg(res.msg);
					}
				});
			});
		});
	</script>
	</body>
</html>
